from rest_framework import serializers


class TextToImgSerialization(serializers.Serializer):
    workflow_id = serializers.CharField(label='workflow_id', required=True, allow_null=True, allow_blank=True)
    prompt = serializers.CharField(label='prompt', max_length=1000, required=True, allow_null=True, allow_blank=True)
    negative_prompt = serializers.CharField(label='negative_prompt', max_length=1000, required=True, allow_null=True, allow_blank=True)


class ImgToImgSerializer(serializers.Serializer):
    id = serializers.IntegerField(label='id', read_only=True, allow_null=False)
    image = serializers.ImageField(label='image', max_length=100, allow_null=False)


class GetProgressSerializer(serializers.Serializer):
    id = serializers.IntegerField(label='id', read_only=True, allow_null=False)


class GetPromptSerializer(serializers.Serializer):
    prompt_id = serializers.CharField(label='prompt_id', max_length=100, required=True, allow_null=True, allow_blank=True)
    client_id = serializers.CharField(label='client_id', max_length=100, required=True, allow_null=True, allow_blank=True)


class GenerationHistorySerializer(serializers.Serializer):
    client_id = serializers.CharField(label='client_id', max_length=100, required=True, allow_null=True, allow_blank=True)